package com.woniuxy.invest.controller;

import com.woniuxy.commons.request.ResponseResult;
import com.woniuxy.invest.service.InvestService;
import com.woniuxy.commons.vo.InvestVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
@Slf4j
@RestController
@RequestMapping("/invest")
public class InvestController {

    @Resource
    private InvestService investService;

    @PostMapping("/addInvest")
    public ResponseResult<Boolean> addInvest(@RequestBody InvestVo investVo){
        log.info("添加投注记录");
        return new ResponseResult<>(ResponseResult.OK, investService.addInvest(investVo));
    }

}
